<?php if(!$this->tpl_var['userhash']){ ?>
<?php $this->_compileInclude('header'); ?>
<body>
<?php $this->_compileInclude('nav'); ?>
<div class="container-fluid">
	<div class="row-fluid">
		<div class="main">
			<div class="col-xs-2 leftmenu">
                <?php $this->_compileInclude('menu'); ?>
			</div>
			<div id="datacontent">
<?php } ?>
				<div class="box itembox" style="padding-top:10px;margin-bottom:0px;">
					<h4 class="title" style="padding:10px;">
                        <?php if($this->tpl_var['catid']){ ?><?php echo $this->tpl_var['categories'][$this->tpl_var['catid']]['catname']; ?><?php } else { ?>所有课程<?php } ?>
					</h4>

					<table class="table table-hover table-bordered">
						<thead>
							<tr class="info">
								<th width="36">ID</th>
								<th width="80">缩略图</th>
								<th>标题</th>
								<th width="200">分类</th>
								<th width="100">发布时间</th>
								<th width="100">开通人数</th>
								<th width="100">操作</th>
							</tr>
						</thead>
						<tbody>
							<?php $cid = 0;
 foreach($this->tpl_var['courses']['data'] as $key => $course){ 
 $cid++; ?>
							<tr>
								<td><?php echo $course['csid']; ?></td>
								<td class="picture"><img src="<?php if($course['csthumb']){ ?><?php echo $course['csthumb']; ?><?php } else { ?>app/core/styles/images/noupload.gif<?php } ?>" alt="" style="width:24px;"/></td>
								<td>
									<?php echo $course['cstitle']; ?>
								</td>
								<td>
									<a href="index.php?course-teach-course&catid=<?php echo $course['cscatid']; ?>" target=""><?php echo $this->tpl_var['categories'][$course['cscatid']]['catname']; ?></a>
								</td>
								<td>
									<?php echo date('Y-m-d',$course['cstime']); ?>
								</td>
								<td>
									<a href="index.php?course-teach-course-members&courseid=<?php echo $course['csid']; ?>" class="autoloaditem" autoload="index.php?course-teach-course-getcoursemembernumber&courseid=<?php echo $course['csid']; ?>">0</a>
								</td>
								<td class="actions">
									<div class="btn-group">
										<a class="btn" href="index.php?course-teach-course-members&courseid=<?php echo $course['csid']; ?>" title="Users"><em class="glyphicon glyphicon-user"></em></a>
										<a class="btn" href="index.php?course-teach-contents&courseid=<?php echo $course['csid']; ?>" title="Courseware"><em class="glyphicon glyphicon-list"></em></a>
									</div>
								</td>
							</tr>
							<?php } ?>
						</tbody>
					</table>
					<ul class="pagination pull-right">
						<?php echo $this->tpl_var['courses']['pages']; ?>
					</ul>
				</div>
			</div>
<?php if(!$this->tpl_var['userhash']){ ?>
		</div>
	</div>
</div>
<?php $this->_compileInclude('footer'); ?>
</body>
</html>
<?php } ?>